package com.newenergy.wisehome.common.util;

import android.content.Context;

/**
 * Created by new on 2017/11/17.
 */

public  class ImageUtil {

    public  static Context context;

    public static void init(Context context) {

        ImageUtil.context = context;
    }
    public static int getImageId(String iconName){
        if (context==null) return 0;
        return context.getResources().getIdentifier(iconName, "drawable", context.getPackageName());

    }

}
